% function[ps]=drawAb(A,b,width,height)
% [X,Y]=meshgrid(10:5:width,10:5:height);
% p = [X(:), Y(:)]';
% compare = (A * p <= b * ones(1, size(p, 2)));
% compare = sum(compare) == size(A, 1);
% p = (ones(2, 1) * compare) .* p;
% ps=p(:,find(p(1,:)>0));
% end
function [ps] = drawAb(A, b, width, height)
[X,Y] = meshgrid(10:10:width, 10:10:height);
ps = [];
p = [X(:), Y(:)]';
for i = 1 : size(p, 2)
    sat = true;
    for j = 1 : size(A, 1)
        if A(j, :) * p(:,i) > b(j)
            sat = false;
        end
    end
    if sat
        ps = [ps, p(:, i)];
    end
end
end